const util=require('../../utils/util.js');
const config = require('../../utils/config.js');
let pagenumber=1;
let pagerows=30;
Page({
  data: {

  },
  showorhide:function(){
    var that = this;
    that.setData({
      showView: (!that.data.showView)
    })
  },
  onLoad: function (options) {
    let class_id=options.class_id;
    let class_name=options.class_name;
    wx.setNavigationBarTitle({
      title: class_name,
    })
    let url ='/app/res_list_class';
    let data={
      class_id:class_id,
      pagenumber: pagenumber,
      pagerows: pagerows
    };
    util.request(url,data,res=>{
      console.log(url,res);
      if(res){
        this.setData({
          list:res.rows,
          config: config,
          ready:true
        })
        if(res.rows.length==0){
          this.setData({
            nothing:true
          })
        }
      }
    });
  },
})
